\documentclass[11pt]{article}
\usepackage{graphicx}



\author{Nicu T.}
\title{Grid Module}
\begin{document}
\maketitle
\tableofcontents
\newpage

\section{Introduction}
Grid package allows one to create markings in model or paper space
to indicate round position values. It users lines and text to do so.



\section{Commands summary}

\begin{tabular}{ c l l } 
    1 & \verb=TNIK_GRID_M=   & Creates a grid in model space using default options \\
    2 & \verb=TNIK_GRID_P=   & Creates a grid in model space, but asks first for options \\
    3 & \verb=TNIK_GRID_MO=  & Creates a grid in paper space using default options \\
    4 & \verb=TNIK_GRID_PO=  & Creates a grid in paper space, but asks first for options \\
    5 & \verb=TNIK_GRID_STG= & Display a dialog for current settings view and edit \\
\end{tabular}



\section{Toolbars}

The package only features one toolbar that exposes all commands:

\includegraphics[height=12mm]{grid_toolbar.png}\\


\section{Common options pattern}

With paper space or with model space, with generic options or with immediate options,
the dialog for choosing how is your grid going to look like is the same:

\includegraphics[height=40mm]{grid_options.png}\\

This has three major parts:
\begin{itemize}
    \item \emph{Borders}: the options in this group refer to the lines and text placed all around the
                    area that you will define
    \item \emph{Inside}: these options control the look and size of the elements placed inside
                    the area to be enhanced
    \item \emph{Maximum grid objects}: for poor chosen combinations a huge number of 
                    objects may result; this results in a long time until the command completes and                    in a great deal of resources being consumed. Usually, this is faulty and needs 
                    to be undone. To prevent this, the module will pre-compute the number of 
                    objects that will result (considering the marker and the text as a single logical object) and will compare the value with the one that user enters here. An error message is shown if the number is too large.
\end{itemize}

\emph{Borders} and \emph{Inside} groups have similar content:
\begin{itemize}
    \item \emph{Marker}: tell if a symbol (a cross for inside area, a line for borders) is to be created or not.
    \item \emph{Values}: tell if the label(s) representing the location are created or not. The labels consist of a single text on borders and on two texts (for X and Y axis) inside.
    \item \emph{Span}: this is a distance and always refers to model space, even when one creates a paper space grid. The module uses this value to compute first visible item on both directions using this formula: 
        \\ \mbox{$X_{Start} = (X_{Min} / Span + 1) * Span$}
        \\ \mbox{$Y_{Start} = (Y_{Min} / Span + 1) * Span$} \\ 
        then places points at each $Span$.
    \item \emph{Line height}: decides how long a line used as marker is going to be. For lines placed on sides (on border) this is the actual length. For lines that are placed inside, this is half the length (from the intersection point of the two lines until the end).
    \item \emph{Text height}: is the height used for labels.
\end{itemize}




\end{document}
